This application is based on and incorporates herein by reference Japanese Patent Applications No. 2000-195868 filed Jun. 29, 2000 and No. 2000-195872 filed Jun. 29, 2000.
This invention relates to an electronic control unit and method, and particularly to a vehicle electronic control unit and method using a timing part such as a clock IC (integrated circuit) which measures time continuously irrespective of whether a microcomputer is operating or stopped.
Electronic control units (ECUs) for vehicles use a built-in clock IC as a timing part to measure elapsed time and use data from the clock IC to calculate time at which the ECU power supply has been turned off, i.e., an engine stoppage time (soak time), and store times at which failures of sensors and actuators have occurred and so on.
Failure determination of a temperature sensor for detecting the temperature of engine cooling water, for instance, is effected as follows. The engine cooling water temperature falls when a fixed time elapses after engine stoppage, and the clock IC measures the time elapsing while the engine is stopped. Then, failure of the water temperature sensor has is detected from how far the detected value (water temperature) from the sensor has fallen when a predetermined time elapses after the engine stoppage.
However, when the supply of power to the clock IC is interrupted and the clock IC is reset while the ECU power supply is turned off, a deviation arises in the time data of the clock IC. Then, for example when an engine stoppage time (soak time) is calculated from the time data of the clock IC, this time will be calculated erroneously. Thus, it becomes impossible to carry out sensor failure determination and the like correctly. That is, because it is not possible to confirm the validity of the time from the clock IC, the deviation arises in the time data causes problems in various parts of control carried out using such time data.
It is therefore a first object of the invention to provide an electronic control unit and method which can recognize correctly when an accidental resetting of a timing part has occurred.
It is a second object of the invention to provide an electronic control unit and method which can correctly carry out a determination of whether time data of a timing part is normal or abnormal.
According to the present invention, an electronic control unit has a timing part continuously supplied with an electric power to measure time and a control part operable to carry out a predetermined operation when the electric power is supplied. A first time measured by the timing part when the electric power to the control part is shut off is stored. A second time measured by the timing part when the electric power to the control part is re-started is read. The control part calculates a time period from the first time to the second time and use the time period in its predetermined operation. The control part checks operation of the timing part upon reading of the second time, and stops the predetermined operation when a check result indicates an abnormality of the timing part.
Preferably, the operation of the timing part is checked with respect to a resetting of the timing part after the electric power to the control part is shut off. Alternatively or in addition, the operation of the timing part is checked by comparing the second time with a prescribed time range that is set to differ from a reference time to which the timing part is reset upon an occurrence of abnormality of timing part.